package com.sailfish.springbootdemo.controller.db7;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.service.db7.TbTemplateVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/TbTemplateVersion")
public class TbTemplateVersionController {
    @Autowired
    private TbTemplateVersionService tbTemplateVersionService;

    @RequestMapping("/getTemplateVersionList")
    public Result getTemplateVersionList(@RequestBody String data) {

        return tbTemplateVersionService.getTemplateVersionList(data);
    }

    @RequestMapping("/getNewestTemplateVersion")
    public Result getNewestTemplateVersion(@RequestBody String data) {

        return tbTemplateVersionService.getNewestTemplateVersion(data);
    }

    @RequestMapping("/publishTemplateVersion")
    public Result publishTemplateVersion(@RequestBody String data) {

        return tbTemplateVersionService.publishTemplateVersion(data);
    }

}
